<%-- 
    Document   : nuevapublicidad
    Created on : Apr 13, 2010, 9:08:10 AM
    Author     : williamprado
--%>

<%
HttpSession currentSession = request.getSession();
if(!currentSession.getAttribute("rol").equals("cliente") || currentSession == null){
    response.sendRedirect("../index.jsp");
}
String nombreCliente = (String)currentSession.getAttribute("nombre");
if(nombreCliente == null){nombreCliente = "";}
int dias = (Integer) currentSession.getAttribute("days");
String tipoPublicidad = (String) currentSession.getAttribute("esquema");
int total = (Integer) currentSession.getAttribute("totalAmount");
String message = (String) currentSession.getAttribute("resultado");
%>

<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Adz - Cliente - Comprar Espacio Publicitario</title>
        <link href="../css/adz.css" rel="stylesheet" type="text/css" />

        <script src="../js/Encriptacion.js" type="text/javascript"></script>
    </head>
    <body bgcolor="#333333">
        <table border="0" width="1024" align="center" bgcolor="#FFFFFF">
        <tr>
            <td width="33%" align="left"><img src="../images/adzlogo.jpg" alt="adz logo" width="75%" height="20%"></td>
            <td width="67%" align="center"><h2><strong>Sistema de Publicidad en Linea</strong></h2></td>
          </tr>
        
	<tr bgcolor="#FFFFFF"><td colspan="2">
	<div id="general" align="center">

	<div id="links" align="center">
    	<table width="100%" bgcolor="#999999">
            <tr align="center">
            	<td>Sesión iniciada como:</td>
                <td><%=nombreCliente%></td>
                <td><a href="nuevapublicidad.jsp">Comprar Publicidad</a></td>
                <td><form name="verPautas" action="../verpautaFrontController" method="post">
                    <input name="action" type="hidden" value="verMisPautas" />
                    <a style="cursor:pointer" onclick="document.verPautas.submit();">Cerrar Sesión</a></form></td>
                <td><form name="signout" action="../sesionFrontController" method="post">
                    <input name="action" type="hidden" value="signout" />
                    <a style="cursor:pointer" onclick="document.signout.submit();">Cerrar Sesión</a></form></td>
            </tr>
            
        </table>
	</div>

        <div id="content" align="center">
        
        <h1>Información de Pago</h1>
        <p>Por favor, llene los campos del siguiente formulario para comprar el espacio publicitario:</p>
        <h2>Datos de la compra</h2>
        <table>
            <tr><td>Tipo de pauta: </td><td><%=tipoPublicidad%></td></tr>
            <tr><td>Dias comprados: </td><td><%=dias%></td></tr>
            <tr><td>Costo total: </td><td><%=total%></td></tr>
        </table>
        <form name="FormRegistro" action="insertarPauta" method="POST">
        <TABLE BORDER=0>
        <TR><TD>Fecha de inicio:</TD><TD><INPUT type="date" name="fecha1"></TD></TR>
        <TR><TD>Fecha de finalización:</TD><TD><INPUT type="date" name="fecha2"></TD></TR>
        <TR><TD>Banner:</TD><TD><INPUT type="text" name="banner"></TD></TR>
        <tr><TD>Banner:</TD><TD><INPUT type="file" name="bannerFile"></TD></TR>
        <TR><TD>URL a que vincula el banner:</TD><TD><INPUT type="text" name="url"></TD></TR>
        <tr><TD>*Nombre completo como se ve en la tarjeta:</TD><TD><INPUT type="text" name="nombretc"></TD></TR>
        <tr><TD>Tarjeta de Credito:</TD><TD><SELECT name="tipotc">
								<OPTION VALUE="american">American Express</OPTION>
								<OPTION VALUE="diners">Diners</OPTION>
								<OPTION VALUE="master">MasterCard</OPTION>
								<OPTION VALUE="visa">Visa</OPTION>								
								</SELECT></TD></TR>
        <tr><TD>*Numero de la tarjeta:</TD><TD><INPUT type="text" name="numerotc"></TD></TR>
        <tr><TD>Fecha de expiracion:</TD><TD><SELECT name="mesexptc">
								<OPTION VALUE="1">Enero</OPTION>
								<OPTION VALUE="2">Febrero</OPTION>
								<OPTION VALUE="3">Marzo</OPTION>
								<OPTION VALUE="4">Abril</OPTION>
                                <OPTION VALUE="5">Mayo</OPTION>
								<OPTION VALUE="6">Junio</OPTION>
								<OPTION VALUE="7">Julio</OPTION>
								<OPTION VALUE="8">Agosto</OPTION>
                                <OPTION VALUE="9">Septiembre</OPTION>
								<OPTION VALUE="10">Octubre</OPTION>
								<OPTION VALUE="11">Noviembre</OPTION>
								<OPTION VALUE="12">Diciembre</OPTION>								
								</SELECT>
                                <SELECT name="yearexptc">
								<OPTION VALUE="2010">2010</OPTION>
								<OPTION VALUE="2011">2011</OPTION>
								<OPTION VALUE="2012">2012</OPTION>
								<OPTION VALUE="2013">2013</OPTION>
                                <OPTION VALUE="2014">2014</OPTION>
								<OPTION VALUE="2015">2015</OPTION>
                                <OPTION VALUE="2016">2016</OPTION>
								<OPTION VALUE="2017">2017</OPTION>
								<OPTION VALUE="2018">2018</OPTION>
                                <OPTION VALUE="2019">2019</OPTION>
								<OPTION VALUE="2020">2020</OPTION>
								<OPTION VALUE="2021">2021</OPTION>
								<OPTION VALUE="2222">2222</OPTION>
                                <OPTION VALUE="2223">2223</OPTION>
                                <OPTION VALUE="2224">2224</OPTION>								
								</SELECT></TD></TR>
        <tr><TD>*Numero de cuotas:</TD><TD><SELECT name="cuotastc">
								<OPTION VALUE="1">1</OPTION>
								<OPTION VALUE="2">2</OPTION>
								<OPTION VALUE="3">3</OPTION>
								<OPTION VALUE="4">4</OPTION>
                                <OPTION VALUE="5">5</OPTION>
								<OPTION VALUE="6">6</OPTION>
                                <OPTION VALUE="7">7</OPTION>
								<OPTION VALUE="8">8</OPTION>
								<OPTION VALUE="9">9</OPTION>
                                <OPTION VALUE="10">10</OPTION>
								<OPTION VALUE="11">11</OPTION>
								<OPTION VALUE="12">12</OPTION>
								<OPTION VALUE="13">13</OPTION>
                                <OPTION VALUE="14">14</OPTION>
                                <OPTION VALUE="15">15</OPTION>
                                <OPTION VALUE="16">16</OPTION>
                                <OPTION VALUE="17">17</OPTION>
								<OPTION VALUE="18">18</OPTION>
								<OPTION VALUE="19">19</OPTION>
                                <OPTION VALUE="20">20</OPTION>
								<OPTION VALUE="21">21</OPTION>
								<OPTION VALUE="22">22</OPTION>
								<OPTION VALUE="23">23</OPTION>
                                <OPTION VALUE="24">24</OPTION>
                                <OPTION VALUE="25">25</OPTION>
                                <OPTION VALUE="26">26</OPTION>
                                <OPTION VALUE="27">27</OPTION>
								<OPTION VALUE="28">28</OPTION>
								<OPTION VALUE="29">29</OPTION>
                                <OPTION VALUE="30">30</OPTION>
								<OPTION VALUE="31">31</OPTION>
								<OPTION VALUE="32">32</OPTION>
								<OPTION VALUE="33">33</OPTION>
                                <OPTION VALUE="34">34</OPTION>
                                <OPTION VALUE="35">35</OPTION>
                                <OPTION VALUE="36">36</OPTION>								
								</SELECT></TD></TR>
        <TR><TD colspan="2" align="center"><input type="hidden" name="action" value="pagar" /><INPUT type="submit" value="Confirmar pago"> <input type="reset" value="limpiar campos" /> <input type="button" value="Regresar" /></TD></TR>
        </TABLE>
        </form>

	    </div>
        
        </div>
        
        <%=message%>

        </td></tr>
    </table>

	<div id="footer" align="center">
	Adz - 2010 Copyright &copy; Todos los derechos reservados.</div>

	       
        
	</body>
</html>
